#include "Food.h"
#include <cmath>
#define DEBUG
#ifdef DEBUG
#include <cassert>
#endif

int  Food::MAX_HEIGHT = 20;
int  Food::MAX_WIDTH = 20;
int  Food::MIN_HEIGHT = 0;
int  Food::MIN_WIDTH = 0;
char Food::SPRITE = '#';

Food::Food(int x, int y)
{
	pos.first = x;
	pos.second = y;
}
void Food::Draw() const
{
	ixion::SetCursorPos(pos.first,pos.second);
	std::cout << SPRITE;
}
void Food::Change()
{
	int x = ( abs(rand()) % ( Food::MAX_WIDTH - Food::MIN_WIDTH) ) + Food::MIN_WIDTH + 1;
	int y = ( abs(rand()) % ( Food::MAX_HEIGHT - Food::MIN_HEIGHT) ) + Food::MIN_HEIGHT + 1;
	
	pos.first = x;
	pos.second = y;
}
void Food::Change(int X, int Y)
{	
	pos.first = X;
	pos.second = Y;
}